/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bridge;

import com.sun.corba.se.impl.orbutil.concurrent.Mutex;
import java.util.concurrent.Semaphore;

/**
 *
 * @author vivancu
 */
public class Printer {

    private static Semaphore mutex = new Semaphore(1, true);

    public static void println(String msg) throws InterruptedException {
        mutex.acquire();
        System.out.println(msg);
        mutex.release();
    }
}
